Skip to content

AppCred support#1430

Merged
openshift-merge-bot[bot] merged 1 commit intoopenstack-k8s-operators:mainfrom
Deydra71:appcred-support
Feb 6, 2026
Merged

AppCred support#1430
openshift-merge-bot[bot] merged 1 commit intoopenstack-k8s-operators:mainfrom
Deydra71:appcred-support

Conversation

@Deydra71
Copy link
Copy Markdown
Contributor

@Deydra71 Deydra71 commented May 7, 2025

OSPRH-14738

This PR add ApplicationCredential support enabling both global defaults and service-specific overrides in OpenStackControlPlane.

CRD updates:

  • New top-level spec.applicationCredential section with enabled, expirationDays and gracePeriodDays
  • Added applicationCredential field to each service section that has a corresponding Keystone user
  • Defaults guarantee visible enabled:false in every supported service, while expirationDays and gracePeriodDays are hidden unless specified directly (in that case global values are used).

Controller logic:

  • To enable AppCred both global and service specific must be enable: true
  • For each enabled service, controller creates AC CR
  • Deletes service AC CRs when either global or service enabled is turned off

Example:

 spec:
  applicationCredential:
    enabled: true
    expirationDays: 14
    gracePeriodDays: 7
  barbican:
    applicationCredential:
      enabled: true
      expirationDays: 2
      gracePeriodDays: 1
  cinder:
    applicationCredential:
      enabled: true

In the example barbican is using days overrides, while cinder is using default values.

Depends-On: openstack-k8s-operators/keystone-operator#567

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1430,edb1584a0e480eb9b099e45478bca2c880c67006

@softwarefactory-project-zuul
Copy link
Copy Markdown

Unable to freeze job graph: Job adoption-standalone-to-crc-ceph-provider depends on openstack-k8s-operators-content-provider which was not run.

@danpawlik
Copy link
Copy Markdown
Contributor

recheck

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/fb95ce639e164bb190aa3b41fcda82da

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 59m 19s
podified-multinode-edpm-deployment-crc FAILURE in 1h 38m 01s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 31m 54s
adoption-standalone-to-crc-ceph-provider FAILURE in 1h 39m 09s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 31m 34s
openstack-operator-kuttl FAILURE in 28m 08s (non-voting)

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/64ab1660f5ff460cb0bdb2682d3b4149

openstack-k8s-operators-content-provider FAILURE in 15m 15s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5ebbd01a8bc549b2956a87c3507363e2

openstack-k8s-operators-content-provider FAILURE in 13m 33s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/67ea6f17ebce4477b46d077171537d98

openstack-k8s-operators-content-provider FAILURE in 13m 49s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/65697c077ffe4630a698b4a94657a08a

openstack-k8s-operators-content-provider FAILURE in 16m 43s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8b21d132d2c944f4bb8faccfff711e47

openstack-k8s-operators-content-provider FAILURE in 14m 09s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)

@Deydra71 Deydra71 force-pushed the appcred-support branch 2 times, most recently from 62fd3e5 to 27db2bd Compare May 21, 2025 09:16
@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1430,27db2bd11155d687612f5ae130e8cb42336647e1

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5c42e7939c0a40fa92ed0b1ba8dfae74

openstack-k8s-operators-content-provider FAILURE in 12m 38s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

if barbicanSecret == "" {
barbicanSecret = instance.Spec.Secret
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think to prevent the bellow mentioned flapping we'd have to do something like we do for certs to fetch the current auth from the running barbican

	if isACEnabled(instance.Spec.ApplicationCredential, instance.Spec.Barbican.ApplicationCredential) {
		instance.Spec.Barbican.Template.Auth = barbican.Spec.Barbican.Template.Auth
    }

Comment thread internal/openstack/barbican.go Outdated
Comment on lines +88 to +96
// Set or clear ApplicationCredentialSecret
// - If AC disabled: use password
// - If AC enabled AND ready: use AC
// - If AC enabled BUT not ready: leave unchanged to avoid flapping
if acSecretName == "" && !isACEnabled(instance.Spec.ApplicationCredential, instance.Spec.Barbican.ApplicationCredential) {
instance.Spec.Barbican.Template.Auth.ApplicationCredentialSecret = ""
} else if acSecretName != "" {
instance.Spec.Barbican.Template.Auth.ApplicationCredentialSecret = acSecretName
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the above comment, it might be ok to just assign what EnsureApplicationCredentialForService returns as the ApplicationCredentialSecret

instance.Spec.Barbican.Template.Auth.ApplicationCredentialSecret = acSecretName
  • If AC disabled: use password, it returns ""
  • If AC enabled AND ready. it returns the name

Comment thread internal/openstack/barbican.go Outdated
)
if err != nil {
return ctrl.Result{}, err
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have to return for the Application Credential not ready yet case when we return with the RequeueAfter?

if (acResult != ctrl.Result{}) {
		return acResult, nil
}

Comment thread internal/openstack/barbican.go Outdated
barbicanSecret = instance.Spec.Secret
}

acSecretName, acResult, err := EnsureApplicationCredentialForService(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default for AC is that they are disabled. wondering if we don't have to call it if ac is disabled and there is no current barbican.Spec.Barbican.Template.Auth.ApplicationCredentialSecret configured?

Comment thread internal/openstack/barbican.go Outdated
Comment on lines +221 to +223
if barbicanReady && (acResult != ctrl.Result{}) {
return acResult, nil
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as commented above, wondering why we do it at the bottom and not right after the ensure func?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that if we returned early right after the rnsure, the service would never get created/udpated when AC is being providioned because we would skip CreateOrPatch?

@stuggi
Copy link
Copy Markdown
Contributor

stuggi commented Jan 23, 2026

this looks a lot cleaner!! just some questions for clarification, and maybe improving things

@Deydra71 Deydra71 force-pushed the appcred-support branch 2 times, most recently from 1378a63 to b14002d Compare January 23, 2026 11:16
@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/137c17c222454d38876bdbcd8e0a819a

openstack-k8s-operators-content-provider FAILURE in 12m 25s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1430,abd35b4d11d6b95e7553f8b0d421da5d6afbf10d

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/045a5dddacfa477d9cb68393191d1719

openstack-k8s-operators-content-provider FAILURE in 12m 52s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@xek xek force-pushed the appcred-support branch from b82b652 to 1f136f8 Compare January 27, 2026 15:39
Comment thread api/go.mod Outdated
replace github.com/cert-manager/cmctl/v2 => github.com/cert-manager/cmctl/v2 v2.1.2-0.20241127223932-88edb96860cf //allow-merging

// appcred related changes
replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/Deydra71/keystone-operator/api v0.0.0-20260119142142-e3bd4fb9750f //allow-merging
Copy link
Copy Markdown

@xek xek Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these lines after new versions are released and run tidy

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/b1b7e13ddaa04b02a720ca60197ce146

openstack-k8s-operators-content-provider FAILURE in 12m 34s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@xek xek force-pushed the appcred-support branch from 1f136f8 to 9ecd49b Compare January 28, 2026 11:36
@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/743bfa4caa564529bf798ba240bf1954

openstack-k8s-operators-content-provider FAILURE in 27m 28s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@Deydra71
Copy link
Copy Markdown
Contributor Author

Deydra71 commented Feb 2, 2026

Note: we need to update cinder, manila and heat after they are bumped, because we changed the placement of Auth spec in these service operators

@stuggi
Copy link
Copy Markdown
Contributor

stuggi commented Feb 6, 2026

/test openstack-operator-build-deploy-kuttl-4-18

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/c44a41aa146143b2b8444978acad6ee7

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 08m 11s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 18m 17s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 25m 22s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 2h 53m 10s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 47m 36s

@Deydra71
Copy link
Copy Markdown
Contributor Author

Deydra71 commented Feb 6, 2026

/retest

@Deydra71
Copy link
Copy Markdown
Contributor Author

Deydra71 commented Feb 6, 2026

/test functional

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 6, 2026

@Deydra71: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openstack-operator-build-deploy-kuttl 9ecd49b link true /test openstack-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@stuggi
Copy link
Copy Markdown
Contributor

stuggi commented Feb 6, 2026

/test openstack-operator-build-deploy-kuttl-4-18

Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
Copy link
Copy Markdown
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Deydra71, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants